package org.xg.study.pd.domain;

import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author CMG
 * @version 1.0
 * @description
 * @cLassName UserInfo
 * @date 2021/9/15 14:43
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserInfo {
    private String code;
    private String info;

    private String name;
    private Integer age;
    private String address;

    public UserInfo(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public UserInfo(String name, Integer age, String address) {
        this.code = "0000";
        this.info = "success";
        this.name = name;
        this.age = age;
        this.address = address;
    }

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
